package com.jmp.chat.tenxun;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Builder;
import lombok.Data;

import java.util.List;

/**
 * @author cjr
 */
@Data
@Builder
public class TenxunChatSendmsgRequest {
    @JSONField(name = "SyncOtherMachine")
    private Integer SyncOtherMachine;
    @JSONField(name = "From_Account")
    private String From_Account;
    @JSONField(name = "To_Account")
    private String To_Account;
    @JSONField(name = "MsgLifeTime")
    private Integer MsgLifeTime;
    @JSONField(name = "MsgRandom")
    private Integer MsgRandom;
    @JSONField(name = "MsgBody")
    private List<MsgBody> MsgBody;
    @JSONField(name = "OfflinePushInfo")
    private OfflinePushInfo OfflinePushInfo;

    @Data
    @Builder
    public static class MsgBody {
        @JSONField(name = "MsgType")
        private String MsgType;
        @JSONField(name = "MsgContent")
        private Object MsgContent;
    }

    @Data
    @Builder
    public static class MsgContent {
        @JSONField(name = "Text")
        private String Text;
    }

    @Data
    @Builder
    public static class MsgContentCustomer {
        @JSONField(name = "Data")
        private String Data;
    }

    @Data
    @Builder
    public static class OfflinePushInfo {
        @JSONField(name = "PushFlag")
        private Integer PushFlag;
        @JSONField(name = "Title")
        private String Title;
        @JSONField(name = "Desc")
        private String Desc;
        @JSONField(name = "Ext")
        private String Ext;
        @JSONField(name = "ApnsInfo")
        private ApnsInfo ApnsInfo;
    }
    @Data
    @Builder
    public static class ApnsInfo {
        @JSONField(name = "BadgeMode")
        private Integer BadgeMode;
    }
}
